
/**
 * 配置项
 */

import { readJson, mapPath } from './utils/file';

interface iconfig {
    // 服务器端口号
    port: string;
    // 百度的 appid
    baidu: {
        appid: string;
        apikey: string;
        secretkey: string;
    },
    // 扇贝的 appid
    shanbay: {
        appkey: string;
    }
}
let config: iconfig;
try {
    config = readJson(mapPath('/config/config.json'));
} catch (e) {
    config = {
        port: '3001',
        baidu: {
            appid: '',
            apikey: '',
            secretkey: '',
        },
        shanbay: {
            appkey: '',
        }
    } as iconfig
}

export default config;
